package aaaClicker;

import java.util.List;

import com.attilax.io.filex;
import com.attilax.io.pathx;

public class genePac {

	public static void main(String[] args) {
		List<String> li = filex.read2list_filtEmptyNstartSpace("e:\\proxy.txt");
		int n = 0;
		String proxs = "";
		for (String line : li) {
			String f = pathx.classPath(genePac.class) + "\\pacSamp.txt";
			String t = filex.read(f);
			t = t.replaceAll("@proxy", line)
					.replaceAll("@n", String.valueOf(n));
			proxs = proxs + "\r\n" + t;
			System.out.println(t);
			n++;
		}
		System.out.println(proxs);
		String f = pathx.classPath(genePac.class) + "\\proxy_tmplt.txt";
		String t = filex.read(f);
		t = t.replaceAll("@proxy", proxs).replaceAll("@n",
				String.valueOf(li.size()-1));
		filex.write("e:\\proxy.pac", t, "gbk");
		System.out.println("--f");
	}

}
